<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>个人中心</title>
<link type="text/css" rel="stylesheet" href="{$css_path}/css.css"/>
<link type="text/css" rel="stylesheet" href="{$css_path}/global.css"/>
<link rel="stylesheet" href="{$css_path}/powerFloat.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="{$js_path}/jnotify/jNotify.jquery.css" />
</head>
<body>
{include file="header.html"}
<div id="wrapper">
  <div id="content">
    <div id="con_le"> {include file="user_nav.html"} 
    </div>
    <!--con_le over-->
    <div id="con_box">
      <div class="Current">{$position}</div>
      <div class="con_top"> {include file="user_common_detail.html"}
        <div class="clear"></div>
      </div>
      <div id="user_content"> {include file="message.html"}
        <div id="message_action"> 
        {if !empty($trade_post_menu)}
        	{foreach from=$trade_post_menu item=list}
            <a href="{$list.url}">{$list.name}</a>
            {/foreach}
        {/if}
        
     
          </div>
          
        {if count($trade_list)>0}
        <table width="100%" cellspacing="0" cellpadding="0" class="tableStatic">
          <thead>
            <tr>
              <td width="40%">标题</td>
              <td width="10%">链接</td>
              <td width="30%">状态</td>
              <td width="10%">添加时间</td>
            </tr>
          </thead>
          <tbody>
          
          {foreach from=$trade_list item=list}
          <tr id="tr_collect_{$list.id}">
            <td>{$list.name}</td>
            <td align="center"><a href="{$list.url}" target="_blank">点击查看</a></td>
            <td><span class="end_time" value="{$list.limit_time}"></span></td>
			<td align="center">{$list.add_time|date:2}</td>
          </tr>
          {/foreach}
            </tbody>
          
          {if !empty($page)}
          <tfoot>
            <tr>
              <td colspan="5" align="center">{$page}</td>
            </tr>
          </tfoot>
          {/if}
        </table>
        {else}
        <h1 style="color:#CCC;text-align:center;margin-top:60px;">暂无</h1>
        {/if}
        <div class="clear"></div>
      </div>
    </div>
    <!--con_box over-->
    <div class="clear"></div>
  </div>
  <!--content over--> 
</div>
{include file="footer.html"}
{include file="hidden_div.html"} 
<script type="text/javascript" src="{$js_path}/jquery.js"></script> 
<script type="text/javascript" src="{$js_path}/jquery-powerFloat.js"></script> 
<script type="text/javascript" src="{$js_path}/jquery.pngfix.js"></script> 
<script type="text/javascript" src="{$js_path}/scrolltopcontrol.js"></script> 
<script type="text/javascript" src="{$js_path}/myfloat.js"></script> 
<script type="text/javascript" src="{$js_path}/lhgdialog/lhgcore.lhgdialog.min.js"></script> 
<script type="text/javascript" src="{$js_path}/jnotify/jNotify.jquery.js"></script> 
<script type="text/javascript" src="{$js_path}/jquery.validate.js"></script> 
<script type="text/javascript" src="{$js_path}/message.js"></script> 
<script type="text/javascript" src="{$js_path}/common.js"></script> 
<script type="text/javascript" src="{$js_path}/user.js"></script> 
<script>
$(function(){
	
	//发送和接受的当前状态
	$('#message_action a').each(function(){
		if($(this).attr('href') == window.location.pathname){
			  $(this).attr('class','current');
		}
	});
	
	  
})

</script>
<script type="text/javascript">
var serverTime = {$server_time} * 1000;
$(function(){
    var dateTime = new Date();
    var difference = dateTime.getTime() - serverTime;
	
    setInterval(function(){
      $(".end_time").each(function(){
        var obj = $(this);
        var endTime = new Date(parseInt(obj.attr('value')) * 1000);
        var nowTime = new Date();
        var nMS=endTime.getTime() - nowTime.getTime() + difference;
        var myD=Math.floor(nMS/(1000 * 60 * 60 * 24));
        var myH=Math.floor(nMS/(1000*60*60)) % 24;
        var myM=Math.floor(nMS/(1000*60)) % 60;
		var myS=Math.floor(nMS/(1000)) % 60;
        if(myD>= 0){
			var str = "还剩："+myD+"天"+myH+"小时"+myM+"分"+myS+"秒";
        }else{
			var str = "已结束！";	
		}
		
		$(this).html(str);
      });
    }, 100);
});
</script>
</body>
</html>
